From: Jonas Ã…dahl Date: Wed, 19 Feb 2020 21:54:42 +0000 (+0100) Subject: closeDialog: Make dialog inactive while fading out X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~772^2^2~74 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=32fa060a62051a6fc98532d43e060c65ec7848a7;p=gnome-shell.git closeDialog: Make dialog inactive while fading out Otherwise the user might click Kill, which would crash if the fade-out was triggered because a Wayland window was closed. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1032 --- diff --git a/js/ui/closeDialog.js b/js/ui/closeDialog.js index 4ee6de6d2..01799bd4c 100644 --- a/js/ui/closeDialog.js +++ b/js/ui/closeDialog.js @@ -192,6 +192,7 @@ var CloseDialog = GObject.registerClass({ this._dialog = null; this._removeWindowEffect(); + dialog.makeInactive(); dialog._dialog.ease({ scale_y: 0, mode: Clutter.AnimationMode.LINEAR, diff --git a/js/ui/dialog.js b/js/ui/dialog.js index 694da4e15..dacdf3d39 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -58,10 +58,16 @@ class Dialog extends St.Widget { this._dialog.add_child(this.buttonLayout); } - _onDestroy() { + makeInactive() { if (this._eventId != 0) this._parentActor.disconnect(this._eventId); this._eventId = 0; + + this.buttonLayout.get_children().forEach(c => c.set_reactive(false)); + } + + _onDestroy() { + this.makeInactive(); } _modalEventHandler(actor, event) {